﻿
@model PagedList.IPagedList<VideoGiaitri.Models.topgame>
@using PagedList.Mvc; 
@{
    ViewBag.title = "Video liên minh huyền thoại hay, mới, lạ";
    ViewBag.des = "tổng hợp các video liên minh huyền thoại mới nhất trong ngày";
    ViewBag.url = VideoGiaitri.Uti.domain+"/Lmht";
    ViewBag.image = "/Images/logo.png";
    Layout = "~/Views/Shared/_LayoutLmht.cshtml";
    string content = "";
}

@foreach (var item in Model) {
    content += "<li>";
    content += "<a href=\"/Lmht/Xem/"+item.id+"\" target=\"_blank\">";
    content += "<span class=\"play-icon\"></span>";
    content += "<span class=\"background-video\"></span>";
    content += "<img src=\"" + item.image + "\" alt=\"" + Html.Raw(Server.HtmlDecode(item.title)) + "\" class=\"hot-video-img\">";
    content += "<span class=\"hot-video-title\">" + Html.Raw(Server.HtmlDecode(item.title)) + "</span>";
    content += "</a>";
    content += "</li>";
}

   <div class="col-md-video padding-r-0 padding-l-10" id="right-col">            
            <div class="list-video">                
                <h3 class="list-video-title">Mới nhất</h3>  
                 <ul class="list-hot-video">
                     <div>
                        <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                        <!-- Home Banner -->
                        <ins class="adsbygoogle"
                             style="display:inline-block;width:728px;height:90px"
                             data-ad-client="ca-pub-6575239088642506"
                             data-ad-slot="8184893671"></ins>
                        <script>
                            (adsbygoogle = window.adsbygoogle || []).push({});
                        </script>
                    </div>
                     @Html.Raw(content)
                 </ul>
                <div class="search-group" style="display:block;float:left;position:relative;width:90%;">
                    <input type="text" id="keyword" class="form-control" placeholder="Từ khóa" style="display:block;float:left;position:relative;width:45%;" onkeypress="return runScript(event)">
                    <button type="button" class="btn btn-default" style="display:block;float:left;position:relative;width:85px;" onclick="search();">Tìm kiếm</button>
                </div>
                 <div class="page-navigation">
                     <ul class="navigation-bar">
                        @for (int i = 1; i <= Model.PageCount; i++) { 
                            <text><li><a href="/Lmht/Index?page=@i">@i</a></li></text>
                        }
                     </ul>
                </div>
                <div class="clear-fix"></div>                
            </div>
                              
    </div> 
    <script>
        function search() {
            window.location = '/Lmht/Search?keyword=' + document.getElementById('keyword').value;
        }
        function runScript(e) {
            if (e.keyCode == 13) {
                window.location = '/Lmht/Search?keyword=' + document.getElementById('keyword').value;
                return false;
            }
        }
</script>
